Optimal. Leaf size=118 \[ \frac {(b c-a d) (5 b c-a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 \sqrt {c} d^{7/2}}-\frac {x (b c-a d) (5 b c-a d)}{2 c d^3}+\frac {x^3 (b c-a d)^2}{2 c d^2 \left (c+d x^2\right )}+\frac {b^2 x^3}{3 d^2} \]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {463, 459, 321, 205} \begin {gather*} \frac {x^3 (b c-a d)^2}{2 c d^2 \left (c+d x^2\right )}-\frac {x (b c-a d) (5 b c-a d)}{2 c d^3}+\frac {(b c-a d) (5 b c-a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 \sqrt {c} d^{7/2}}+\frac {b^2 x^3}{3 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 321
Rule 459
Rule 463
Rubi steps
\begin {align*} \int \frac {x^2 \left (a+b x^2\right )^2}{\left (c+d x^2\right )^2} \, dx &=\frac {(b c-a d)^2 x^3}{2 c d^2 \left (c+d x^2\right )}-\frac {\int \frac {x^2 \left (3 b^2 c^2-6 a b c d+a^2 d^2-2 b^2 c d x^2\right )}{c+d x^2} \, dx}{2 c d^2}\\ &=\frac {b^2 x^3}{3 d^2}+\frac {(b c-a d)^2 x^3}{2 c d^2 \left (c+d x^2\right )}-\frac {((b c-a d) (5 b c-a d)) \int \frac {x^2}{c+d x^2} \, dx}{2 c d^2}\\ &=-\frac {(b c-a d) (5 b c-a d) x}{2 c d^3}+\frac {b^2 x^3}{3 d^2}+\frac {(b c-a d)^2 x^3}{2 c d^2 \left (c+d x^2\right )}+\frac {((b c-a d) (5 b c-a d)) \int \frac {1}{c+d x^2} \, dx}{2 d^3}\\ &=-\frac {(b c-a d) (5 b c-a d) x}{2 c d^3}+\frac {b^2 x^3}{3 d^2}+\frac {(b c-a d)^2 x^3}{2 c d^2 \left (c+d x^2\right )}+\frac {(b c-a d) (5 b c-a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 \sqrt {c} d^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 105, normalized size = 0.89 \begin {gather*} \frac {\left (a^2 d^2-6 a b c d+5 b^2 c^2\right ) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 \sqrt {c} d^{7/2}}-\frac {x (b c-a d)^2}{2 d^3 \left (c+d x^2\right )}-\frac {2 b x (b c-a d)}{d^3}+\frac {b^2 x^3}{3 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^2 \left (a+b x^2\right )^2}{\left (c+d x^2\right )^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.80, size = 342, normalized size = 2.90 \begin {gather*} \left [\frac {4 \, b^{2} c d^{3} x^{5} - 4 \, {\left (5 \, b^{2} c^{2} d^{2} - 6 \, a b c d^{3}\right )} x^{3} - 3 \, {\left (5 \, b^{2} c^{3} - 6 \, a b c^{2} d + a^{2} c d^{2} + {\left (5 \, b^{2} c^{2} d - 6 \, a b c d^{2} + a^{2} d^{3}\right )} x^{2}\right )} \sqrt {-c d} \log \left (\frac {d x^{2} - 2 \, \sqrt {-c d} x - c}{d x^{2} + c}\right ) - 6 \, {\left (5 \, b^{2} c^{3} d - 6 \, a b c^{2} d^{2} + a^{2} c d^{3}\right )} x}{12 \, {\left (c d^{5} x^{2} + c^{2} d^{4}\right )}}, \frac {2 \, b^{2} c d^{3} x^{5} - 2 \, {\left (5 \, b^{2} c^{2} d^{2} - 6 \, a b c d^{3}\right )} x^{3} + 3 \, {\left (5 \, b^{2} c^{3} - 6 \, a b c^{2} d + a^{2} c d^{2} + {\left (5 \, b^{2} c^{2} d - 6 \, a b c d^{2} + a^{2} d^{3}\right )} x^{2}\right )} \sqrt {c d} \arctan \left (\frac {\sqrt {c d} x}{c}\right ) - 3 \, {\left (5 \, b^{2} c^{3} d - 6 \, a b c^{2} d^{2} + a^{2} c d^{3}\right )} x}{6 \, {\left (c d^{5} x^{2} + c^{2} d^{4}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.30, size = 114, normalized size = 0.97 \begin {gather*} \frac {{\left (5 \, b^{2} c^{2} - 6 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \, \sqrt {c d} d^{3}} - \frac {b^{2} c^{2} x - 2 \, a b c d x + a^{2} d^{2} x}{2 \, {\left (d x^{2} + c\right )} d^{3}} + \frac {b^{2} d^{4} x^{3} - 6 \, b^{2} c d^{3} x + 6 \, a b d^{4} x}{3 \, d^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 156, normalized size = 1.32 \begin {gather*} \frac {b^{2} x^{3}}{3 d^{2}}-\frac {a^{2} x}{2 \left (d \,x^{2}+c \right ) d}+\frac {a^{2} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \sqrt {c d}\, d}+\frac {a b c x}{\left (d \,x^{2}+c \right ) d^{2}}-\frac {3 a b c \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {c d}\, d^{2}}-\frac {b^{2} c^{2} x}{2 \left (d \,x^{2}+c \right ) d^{3}}+\frac {5 b^{2} c^{2} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \sqrt {c d}\, d^{3}}+\frac {2 a b x}{d^{2}}-\frac {2 b^{2} c x}{d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 2.35, size = 109, normalized size = 0.92 \begin {gather*} -\frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} x}{2 \, {\left (d^{4} x^{2} + c d^{3}\right )}} + \frac {{\left (5 \, b^{2} c^{2} - 6 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \, \sqrt {c d} d^{3}} + \frac {b^{2} d x^{3} - 6 \, {\left (b^{2} c - a b d\right )} x}{3 \, d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.08, size = 146, normalized size = 1.24 \begin {gather*} \frac {b^2\,x^3}{3\,d^2}-\frac {x\,\left (\frac {a^2\,d^2}{2}-a\,b\,c\,d+\frac {b^2\,c^2}{2}\right )}{d^4\,x^2+c\,d^3}-x\,\left (\frac {2\,b^2\,c}{d^3}-\frac {2\,a\,b}{d^2}\right )+\frac {\mathrm {atan}\left (\frac {\sqrt {d}\,x\,\left (a\,d-b\,c\right )\,\left (a\,d-5\,b\,c\right )}{\sqrt {c}\,\left (a^2\,d^2-6\,a\,b\,c\,d+5\,b^2\,c^2\right )}\right )\,\left (a\,d-b\,c\right )\,\left (a\,d-5\,b\,c\right )}{2\,\sqrt {c}\,d^{7/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.87, size = 246, normalized size = 2.08 \begin {gather*} \frac {b^{2} x^{3}}{3 d^{2}} + x \left (\frac {2 a b}{d^{2}} - \frac {2 b^{2} c}{d^{3}}\right ) + \frac {x \left (- a^{2} d^{2} + 2 a b c d - b^{2} c^{2}\right )}{2 c d^{3} + 2 d^{4} x^{2}} - \frac {\sqrt {- \frac {1}{c d^{7}}} \left (a d - 5 b c\right ) \left (a d - b c\right ) \log {\left (- \frac {c d^{3} \sqrt {- \frac {1}{c d^{7}}} \left (a d - 5 b c\right ) \left (a d - b c\right )}{a^{2} d^{2} - 6 a b c d + 5 b^{2} c^{2}} + x \right )}}{4} + \frac {\sqrt {- \frac {1}{c d^{7}}} \left (a d - 5 b c\right ) \left (a d - b c\right ) \log {\left (\frac {c d^{3} \sqrt {- \frac {1}{c d^{7}}} \left (a d - 5 b c\right ) \left (a d - b c\right )}{a^{2} d^{2} - 6 a b c d + 5 b^{2} c^{2}} + x \right )}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________